/*
 * NavigationTreePopup.java
 *
 * Created on 07 March 2004, 00:27
 * Copyright (C) 2004, Velocityme Partnership
 */

package com.velocityme.client.gui.menu.popup;


import javax.swing.JPopupMenu;
import javax.swing.JMenuItem;
import javax.swing.JLabel;
import java.awt.event.*;
/**
 *
 * @author  bradloff
 */
public class NavigationTreePopup extends JPopupMenu{
    JLabel m_label = new JLabel("Shortcut Menu");
    JMenuItem m_cut = new JMenuItem("Cut",'C');
    JMenuItem m_paste = new JMenuItem("Paste",'P');
    JMenuItem m_delete = new JMenuItem("Delete");
    /** Creates a new instance of NavigationTreePopup */
    public NavigationTreePopup() {
        this.add(m_label);
        this.add(m_cut);
        this.add(m_paste);
        this.add(m_delete);
        setPasteEnabled(false);
    }
    public void addActionListenerCut(ActionListener listener){
        m_cut.addActionListener(listener);
    }
    
    public void addActionListenerPaste(ActionListener listener){
        m_paste.addActionListener(listener);
    }
    
    public void addActionListenerDelete(ActionListener listener){
        m_delete.addActionListener(listener);
    }
    
    public void setPasteEnabled(boolean enable){
        m_paste.setEnabled(enable);
    }
    public void setCutEnabled(boolean enable){
        m_cut.setEnabled(enable);
    }
    public void setPasteToolTip(String toolTip){
        m_paste.setToolTipText(toolTip);
    }
    public void setDeleteEnabled(boolean enable){
        m_delete.setEnabled(enable);
    }
}
